// 1908. [DFS递归]整数分解II https://oj.rnd.huawei.com/problems/1908/details
// a^p 其中a叫底数(base), p叫做指数(exponent),结果叫幂(power)
//给定正整数 N,K,P,计算 N 的 K-P
//分解,如果有多个解，找出分解因子的和最大的，按降序返回分解因子的序列 N=sum,
// k=count, p=exp 输入 169 5 2      (5个平方的和) k=5, p=2 输出 [6 6 6 6 5] 169
// 的 5-2 分解存在9个解，如: 12^2 + 4^2 + 2^2 + 2^2 + 1^2 11^2 + 6^2 + 2^2 + 2^2
// + 2^2 6^2 + 6^2 + 6^2 + 6^2 + 5^2  等等，它们对应的分解因子的和分别为 12 + 4
// + 2 + 2 + 1 = 21 11 + 6 + 2 + 2 + 2 = 23 6 + 6 + 6 + 6 + 5 = 29

#include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <unordered_map>
#include <utility>
#include <vector>
//#include "securec.h"  // C字符操作提供的安全库  scanf_s
using namespace std;

class Solution {
 public:
  // 待实现函数，在此函数中填入答题代码;
  map<pair<int, int>, vector<int>>
      mapFactor;  //  {nSum X kCount} => {v1 + v2 + ... + vk}
                  //    map<int, map<int, vector<int>>> myMap;
  vector<int> GetDecomposeResult(int nSum, int kCount, int pExp) {
    if (kCount <= 0 || nSum <= 0) {
      return {};
    }
    if (mapFactor.count({nSum, kCount}) > 0) {
      return mapFactor[{nSum, kCount}];
    }
    // 计算最大底数
    int maxBaseNumber = 0;
    for (int i = 0; i <= sqrt(nSum) + 1; i++) {
      if (pow(i, pExp) >= nSum) {
        maxBaseNumber = i;
        break;
      }
    }
    // printf("N=%d, maxBaseNumber=%d\n", nSum, maxBaseNumber);  // nSum = BaseN
    // ^ pExp
    if (kCount == 1) {  // k个数的和
      if (pow(maxBaseNumber, pExp) == nSum) {
        return {maxBaseNumber};
      } else {
        return {};
      }
    }
    // 多组结果，每组K个,选取最大和的那一组
    vector<vector<int>> ret;
    // 尝试遍历每个底数
    for (int i = 1; i <= maxBaseNumber; ++i) {
      ret.emplace_back(vector<int>{i});
      auto vtOther = GetDecomposeResult(nSum - pow(i, pExp), kCount - 1, pExp);
      if (vtOther.empty()) {
        ret.pop_back();
        continue;
      }
      auto& vtEnd = ret.back();
      vtEnd.insert(vtEnd.end(), vtOther.begin(), vtOther.end());
    }
    // sort
    for (auto& vec : ret) {
      sort(vec.begin(), vec.end(), greater<int>());
    }
    sort(ret.begin(), ret.end(), greater<vector<int>>());
    int maxSum = INT_MIN;
    vector<int> maxRet;
    for (auto vec : ret) {
      int tmp = accumulate(vec.begin(), vec.end(), 0);
      if (tmp > maxSum) {
        maxSum = tmp;
        maxRet = vec;
      }
    }
    mapFactor[{nSum, kCount}] = maxRet;
    return maxRet;
  }
};
// =================================
inline int ReadInt() {
  int number;
  cin >> number;
  return number;
}
template <typename T>
inline void WriteVector(const vector<T>& objects, char delimeter = ' ') {
  auto it = objects.begin();
  if (it == objects.end()) {
    return;
  }
  cout << *it;
  for (++it; it != objects.end(); ++it) {
    cout << delimeter << *it;
  }
}
int main() {
  int nValue = 169, kValue = 5, pValue = 2;
  cin >> nValue >> kValue >> pValue;
  Solution solu;
  auto numbers = solu.GetDecomposeResult(nValue, kValue, pValue);
  cout << "[";
  WriteVector(numbers, ' ');
  cout << "]" << endl;
  return 0;
}
